1
00:00:00,120 --> 00:00:05,580
All right, welcome to the last video in our Python module, so now we're going to be making a port

2
00:00:05,580 --> 00:00:11,700
scanner and you heard me say in last video that it's going to be a terrible port scanner and it is,

3
00:00:11,700 --> 00:00:14,240
but it's going to be a functional port scanner as well.

4
00:00:14,490 --> 00:00:18,490
And we'll talk about what we can do to improve it and how we can think this through.

5
00:00:18,960 --> 00:00:23,880
So what we're going to do is we're going to go ahead and open up a get it here.

6
00:00:23,880 --> 00:00:29,130
So I'm going to say get it and we'll just go ahead and call this scanner DCPI.

7
00:00:31,490 --> 00:00:33,080
And we'll do the ampersand at the end.

8
00:00:35,080 --> 00:00:43,930
And let's go ahead and declare that this is going to be Python three and now let's talk through some

9
00:00:43,930 --> 00:00:44,410
things.

10
00:00:44,420 --> 00:00:47,500
So there's going to be a lot of familiarity.

11
00:00:47,500 --> 00:00:51,640
Everything I've done up until this point has been for a reason, and you're going to start to see it

12
00:00:51,640 --> 00:00:52,540
all tie together.

13
00:00:53,350 --> 00:01:00,520
So the end goal of this project is going to be that we run something along the lines of Python three

14
00:01:00,520 --> 00:01:04,540
scanner dot pi and we provide an IP address here.

15
00:01:05,380 --> 00:01:11,740
Now with that IP address is going to go ahead and scan through a selected port range for us and try

16
00:01:11,740 --> 00:01:15,660
to return back results whether or not the port is open.

17
00:01:16,000 --> 00:01:19,750
So we're just checking if a port is open on a machine.

18
00:01:20,440 --> 00:01:25,120
So to do that, we're going to need a few things.

19
00:01:25,180 --> 00:01:30,550
So first of all, we're going to need to import sis.

20
00:01:31,510 --> 00:01:39,880
We're going to import socket as we are going to make a node to node connection and we're going to import

21
00:01:39,880 --> 00:01:47,190
date time from date time as we're going to make a pretty little banner as well.

22
00:01:48,580 --> 00:01:53,060
So why was this important, I told you this would come back into play.

23
00:01:53,680 --> 00:01:56,820
So we have here an argument.

24
00:01:57,280 --> 00:02:01,110
So there are actually two arguments in theory argument.

25
00:02:01,160 --> 00:02:05,380
Zero is that we're running Scanadu Pie argument.

26
00:02:05,380 --> 00:02:09,250
One is that we are running against an IP address.

27
00:02:09,760 --> 00:02:15,580
Now, since we're building this script out, we want it to take two arguments and only two arguments.

28
00:02:16,090 --> 00:02:19,590
So we're going to build that into our script from the get go.

29
00:02:20,260 --> 00:02:23,440
So let's go ahead and just define our target.

30
00:02:24,100 --> 00:02:29,140
And it's always good when you're building out a script to have good notes in there as well.

31
00:02:29,150 --> 00:02:33,130
So not only that, you can go back and read it, but if you send this to somebody else, they could

32
00:02:33,130 --> 00:02:34,420
also read through it as well.

33
00:02:34,420 --> 00:02:37,700
So put good comments in here, good notes saying what you're doing.

34
00:02:38,170 --> 00:02:42,960
So in this instance, we're going to put an if statement again, conditional argument here.

35
00:02:43,000 --> 00:02:51,070
We're going to say if the length of CICIG v. remember, this is the same thing as like a dollar sign

36
00:02:51,070 --> 00:02:52,240
one in Vache.

37
00:02:52,960 --> 00:02:53,800
We're going to take that.

38
00:02:53,800 --> 00:02:57,610
We're going to say if it's equal to two, we're going to go ahead and do something.

39
00:02:58,450 --> 00:03:04,600
And we're going to do is we're going to declare a variable of target and we're going to say socket.

40
00:03:06,110 --> 00:03:13,890
Guest host by name, and then we're going to get this RB one.

41
00:03:13,910 --> 00:03:19,040
So we're taking the first argument again, this is the same thing as saying one like this in Basche.

42
00:03:19,520 --> 00:03:20,720
Why are we doing this?

43
00:03:21,000 --> 00:03:27,590
Well, we're just translating a hostname here to IPV for now.

44
00:03:27,600 --> 00:03:30,410
This is not inherently necessary.

45
00:03:30,890 --> 00:03:33,590
We could just declare the target by input.

46
00:03:33,920 --> 00:03:36,920
It could just be targeted equal cesta RB one.

47
00:03:37,370 --> 00:03:43,610
But we're just taking an extra step here in case instead of somebody putting in an IP address, they

48
00:03:43,610 --> 00:03:50,810
could just put in like a hostname, say we have a host here and it's like one of mine is called the

49
00:03:50,810 --> 00:03:51,320
Punisher.

50
00:03:51,530 --> 00:03:53,510
You know, what if they put in Punisher?

51
00:03:53,510 --> 00:03:57,410
Well, that Punisher name does DNS and resolves to an IP address.

52
00:03:57,950 --> 00:04:00,910
It's going to go ahead and do that with this argument here.

53
00:04:01,400 --> 00:04:04,370
So we're just putting an extra step, thinking ahead.

54
00:04:05,870 --> 00:04:13,340
We also need else to this, so if it doesn't equal to if it's three, if it's one, it's done, then

55
00:04:13,340 --> 00:04:23,450
we're going to go ahead and just print out and say invalid amount of arguments and then we can actually

56
00:04:24,050 --> 00:04:25,310
take this here.

57
00:04:26,330 --> 00:04:34,160
And we can put this into a print statement as well, just print to say something like syntax Python

58
00:04:34,160 --> 00:04:38,860
three scanner IP address something along those lines.

59
00:04:40,310 --> 00:04:45,190
So let's go ahead and I like to always put in a pretty little banner or something, you know, let's

60
00:04:45,620 --> 00:04:50,290
add a pretty banner and I'm just going to do something like this.

61
00:04:50,300 --> 00:04:53,840
I'm going to say print and we're going to do dashes.

62
00:04:54,150 --> 00:04:57,830
We'll do 50 dashes and then we'll go ahead.

63
00:04:57,840 --> 00:04:59,780
I'm going to copy this just easier.

64
00:05:01,040 --> 00:05:02,990
And let's go ahead and print a couple of things.

65
00:05:02,990 --> 00:05:09,290
We'll say print, we'll say scanning the target and then we'll add a space.

66
00:05:09,290 --> 00:05:19,430
One of those do plus target and then we'll say print time started and then we can just do a space there,

67
00:05:19,430 --> 00:05:23,860
plus the string of date time.

68
00:05:24,180 --> 00:05:26,720
Now, now, that came back into play as well.

69
00:05:27,260 --> 00:05:29,560
So make sure you have three closing parentheses.

70
00:05:29,570 --> 00:05:35,120
So we've now utilized this socket and date time, all of which we have seen in the past.

71
00:05:35,780 --> 00:05:42,470
And then that last copy paste here for the banner, the next thing we're going to do is what is called

72
00:05:42,470 --> 00:05:44,080
a tri statement.

73
00:05:44,090 --> 00:05:45,710
So we're going to try to do something.

74
00:05:46,280 --> 00:05:49,040
And if we can't do it, we have exceptions.

75
00:05:49,220 --> 00:05:52,690
So you'll see what this looks like when it's all built out.

76
00:05:53,060 --> 00:05:58,490
So go ahead and type try and you're going to see try later as well when we get into the exploit development.

77
00:05:58,760 --> 00:06:05,810
So we're going to do a four statements for port in range.

78
00:06:06,290 --> 00:06:07,850
Now we need to specify the range.

79
00:06:08,090 --> 00:06:14,420
If we were going to do a full on port scanner, we would do for port one three sixty five five thirty

80
00:06:14,420 --> 00:06:14,930
five.

81
00:06:15,710 --> 00:06:18,280
OK, that will take forever.

82
00:06:18,290 --> 00:06:20,990
We'll talk about why I told you this was a bad port scanner.

83
00:06:20,990 --> 00:06:23,260
We'll talk about why we're not going to do this in a little bit.

84
00:06:24,470 --> 00:06:29,540
So let's go ahead and delete these and we're just going to put something like fifty to eighty five.

85
00:06:30,380 --> 00:06:37,220
I'll clarify why we're doing that and just a second, so on top of this, let's add in some familiar

86
00:06:37,220 --> 00:06:37,610
language.

87
00:06:37,610 --> 00:06:48,460
We're going to say sequel's socket socket and then socket uff underscore đinđić, comma, socket sock

88
00:06:48,860 --> 00:06:49,490
stream.

89
00:06:49,970 --> 00:06:55,640
Remember, Affinia is IPB for sock stream is our port.

90
00:06:56,450 --> 00:07:05,300
So we're going to say socket dot set default time out to one.

91
00:07:06,800 --> 00:07:07,790
Why are we doing this.

92
00:07:07,820 --> 00:07:10,400
This is going to attempt to connect to a port.

93
00:07:11,000 --> 00:07:16,070
If that port is not connectable, it's going to wait one second and then it's going to move on that

94
00:07:16,070 --> 00:07:16,190
way.

95
00:07:16,190 --> 00:07:18,770
We're not sitting there forever trying to make a connection to a port.

96
00:07:18,770 --> 00:07:20,390
We set the time ourselves.

97
00:07:21,310 --> 00:07:29,200
So we're also going to store a result, so the result is going to be Estcourt, Connect, underscore

98
00:07:29,230 --> 00:07:33,850
X and it's going to be Target comma port.

99
00:07:36,280 --> 00:07:37,730
So why are we doing this?

100
00:07:38,290 --> 00:07:45,730
Well, when we do this connect underscore x ray returns, an air indicator segment that returns an air

101
00:07:45,730 --> 00:07:52,750
indicator, if a port is open, the result back is going to be zero.

102
00:07:53,620 --> 00:07:58,410
If a port is not open, it's going to throw open air, which is going to trigger a one.

103
00:07:59,110 --> 00:08:08,170
So let's think that through if the result is equal to zero, then we're going to go ahead and just print

104
00:08:08,170 --> 00:08:10,660
out that this port is open.

105
00:08:13,630 --> 00:08:19,030
We'll throw this in here, this time for a placeholder instead, let's say, is open and we'll do a

106
00:08:19,030 --> 00:08:20,440
format port.

107
00:08:21,190 --> 00:08:26,170
And then one more thing, I'll close it out and we'll walk through this one more time so that it all

108
00:08:26,170 --> 00:08:26,860
makes sense.

109
00:08:28,000 --> 00:08:30,640
OK, so then we're closing the connection.

110
00:08:31,570 --> 00:08:33,380
OK, so we've got this tri statement.

111
00:08:33,580 --> 00:08:35,270
Let's walk through it one more time.

112
00:08:35,290 --> 00:08:36,600
We've got a for loop here.

113
00:08:36,610 --> 00:08:38,320
Remember, for is just an illiterate.

114
00:08:38,350 --> 00:08:39,300
We're going through an illiterate.

115
00:08:39,310 --> 00:08:42,040
We're going through 450 in.

116
00:08:42,280 --> 00:08:44,280
So we're defining a port right in this range.

117
00:08:44,300 --> 00:08:47,460
So fifty, fifty one fifty two all the way up to eighty five.

118
00:08:48,010 --> 00:08:49,560
We're going to repeat this whole process.

119
00:08:50,080 --> 00:08:54,430
We're going to establish our variable X, which we did in the socket video the previous video.

120
00:08:54,430 --> 00:08:54,700
Right.

121
00:08:55,030 --> 00:08:59,500
Or just declaring, hey, I know I'm going to want to connect IPV for and a port.

122
00:09:00,520 --> 00:09:05,020
When I do make that connection, I want that default time out to be one second.

123
00:09:05,900 --> 00:09:12,020
OK, so then I'm going to store inside of a variable of a result, I'm going to say let's connect to

124
00:09:12,020 --> 00:09:19,880
the target, which we've already established as this ARG V1 and the port, which is our iterate here

125
00:09:19,880 --> 00:09:20,510
in our loop.

126
00:09:21,380 --> 00:09:25,100
And if that port is open, it's going to return zero.

127
00:09:25,460 --> 00:09:27,480
If it's not open, it's going to return one.

128
00:09:28,010 --> 00:09:34,310
So if that result is zero, go ahead and print out that that port is open, close the connection and

129
00:09:34,310 --> 00:09:38,330
then we're going to go back and try to establish another connection with port or with the port number.

130
00:09:38,330 --> 00:09:43,460
Fifty one fifty two fifty three will loop through all this until we make it all the way through eighty

131
00:09:43,460 --> 00:09:43,760
five.

132
00:09:44,830 --> 00:09:50,260
OK, so it's just one big loop that we're doing now, we need to throw in a few exceptions to make this

133
00:09:50,260 --> 00:09:51,230
code really work.

134
00:09:51,730 --> 00:09:53,260
So here's an exception.

135
00:09:53,920 --> 00:09:57,400
Exception keyboard interrupt.

136
00:09:58,150 --> 00:10:03,850
So if you've been using Linux for a little bit now, you should know something like Control C is a keyboard

137
00:10:03,850 --> 00:10:04,240
interrupt.

138
00:10:04,270 --> 00:10:06,460
So we want to interrupt the scan.

139
00:10:06,790 --> 00:10:09,390
We need to define that there is an interruption here.

140
00:10:09,850 --> 00:10:14,680
So I'm just going to put in something like exiting program, OK?

141
00:10:15,130 --> 00:10:19,870
And we're going to say when that happens, when there is a keyboard interrupt, we're going to say this

142
00:10:19,900 --> 00:10:22,820
exit that allows for that clean exit.

143
00:10:24,070 --> 00:10:26,750
OK, there's another exception that could be occurred here, right?

144
00:10:26,770 --> 00:10:36,990
So we're going to say socket that air and we're going to say print hostname could not be resolved.

145
00:10:37,360 --> 00:10:40,540
So if we can't resolve the hostname, DNS is failing us.

146
00:10:40,870 --> 00:10:42,430
We're just going to go ahead and exit out.

147
00:10:43,600 --> 00:10:44,890
And then one more.

148
00:10:45,220 --> 00:10:48,010
What if we can't make the connection to the address in general?

149
00:10:48,460 --> 00:10:50,050
Well, that's what's called a socket error.

150
00:10:50,620 --> 00:10:54,280
So we're going to say socket error and we're going to print out.

151
00:10:56,370 --> 00:11:05,910
Couldn't get in tiger type, I couldn't connect to the server, and then we're also going to exit this

152
00:11:06,120 --> 00:11:07,500
sort of, say, system exit.

153
00:11:09,150 --> 00:11:14,070
So I'll give you a little bit of time to catch up on this script if you're behind, I was typing fast

154
00:11:14,070 --> 00:11:15,120
and talking as well.

155
00:11:16,160 --> 00:11:21,260
So one more walk through, we're going to do our for loop through these specific ports and then we're

156
00:11:21,260 --> 00:11:23,110
going to go ahead and have some exception.

157
00:11:23,120 --> 00:11:26,810
So we're going to try these with exceptions here, if we had control.

158
00:11:26,820 --> 00:11:28,340
See, we want to exit the program.

159
00:11:28,760 --> 00:11:32,210
If there is no hostname resolution, we want to exit the program.

160
00:11:32,480 --> 00:11:36,670
If we can't connect to the IP address that we specify, we want to exit the program.

161
00:11:37,040 --> 00:11:38,660
So we need to build in these exits.

162
00:11:38,660 --> 00:11:45,680
And these are those that this is that thinking logically that I talked about earlier in earlier videos.

163
00:11:45,680 --> 00:11:46,010
Right.

164
00:11:46,010 --> 00:11:49,970
That we it wouldn't hurt to build this out and then just think logically.

165
00:11:49,970 --> 00:11:55,580
And I will be the first person to tell you that when I build the script out and I write it, it's always

166
00:11:55,580 --> 00:11:55,970
terrible.

167
00:11:55,970 --> 00:11:57,440
First time's always terrible.

168
00:11:57,590 --> 00:11:59,840
Tense time still probably pretty terrible.

169
00:12:00,170 --> 00:12:06,050
You have to start thinking of things logically, like you might not define enough statement at the beginning.

170
00:12:06,050 --> 00:12:06,380
Right.

171
00:12:06,380 --> 00:12:11,540
You might have to think through that because you might need one argument or two arguments or three arguments

172
00:12:11,540 --> 00:12:12,140
and you don't know.

173
00:12:12,140 --> 00:12:15,890
So maybe this doesn't look like this and it doesn't look like the pretty banner in here either.

174
00:12:16,280 --> 00:12:22,160
And you just start with this Falu and then you realize, well, maybe I should make that a try statement,

175
00:12:22,160 --> 00:12:28,130
because what if the user wants to exit or there's no connection for a hostname or there's no connection

176
00:12:28,130 --> 00:12:28,670
to the server?

177
00:12:28,670 --> 00:12:32,660
How do we get out of that or else we're just going to be stuck in this for loop until it's done.

178
00:12:32,660 --> 00:12:36,140
But if we get into one of these er situations, it's going to get weird.

179
00:12:36,770 --> 00:12:37,130
Right.

180
00:12:37,150 --> 00:12:38,720
So and then you start thinking through.

181
00:12:38,730 --> 00:12:43,520
OK, well I know my argument, so let me go add in a statement at the top so the user knows how to use

182
00:12:43,520 --> 00:12:48,740
it and then maybe I'll put a pretty banner in there when it's all said and done and it starts to really

183
00:12:49,310 --> 00:12:50,400
design itself.

184
00:12:50,780 --> 00:12:54,520
Now, before we run this, let's talk about why this isn't great.

185
00:12:54,980 --> 00:12:58,340
This is going to sit here and run through one port at a time.

186
00:12:59,300 --> 00:13:04,880
For a second of a time out and then reiterate, this is going to take a little bit to run through these

187
00:13:04,880 --> 00:13:05,040
little.

188
00:13:05,840 --> 00:13:10,910
Now, when we get into scanning, you're going to see that there are tools out there designed that do

189
00:13:10,910 --> 00:13:14,690
it much better, much more efficiently and much faster.

190
00:13:15,650 --> 00:13:20,180
This is not the best way there is something that we could do called threading now, threatening to take

191
00:13:20,180 --> 00:13:25,690
the process and run multiple processes at once for us and allow us to scan a lot of ports at once,

192
00:13:26,060 --> 00:13:28,190
that would be a potential idea here.

193
00:13:28,550 --> 00:13:31,180
And there's just improvements that we can do.

194
00:13:31,460 --> 00:13:37,130
You know, some of the things that we thought about already, like the Sokka hosted by Hostname, you

195
00:13:37,130 --> 00:13:39,080
might not have thought about that in your first iteration.

196
00:13:39,080 --> 00:13:41,630
You might just say, hey, I want to just put it IP for.

197
00:13:42,140 --> 00:13:50,750
And what happens if, you know, we supply an argument and the argument is something like a mixed bunch

198
00:13:50,750 --> 00:13:51,620
of numbers.

199
00:13:51,950 --> 00:13:53,900
Now, it could be like one, five, two.

200
00:13:53,900 --> 00:14:01,400
And then you got letters and somebody mis typed or or what if you give, you know, an IP address that

201
00:14:01,400 --> 00:14:07,880
doesn't exist, something like this, or, you know, maybe like two fifty six dot or two fifty seven

202
00:14:07,880 --> 00:14:10,120
or something, you know, that that isn't possible.

203
00:14:10,130 --> 00:14:11,180
How is that built in.

204
00:14:11,180 --> 00:14:14,410
How are we going to prevent that in our script right now.

205
00:14:14,810 --> 00:14:16,010
Not that big of a deal.

206
00:14:16,220 --> 00:14:17,900
We're writing this for ourselves.

207
00:14:17,900 --> 00:14:20,810
So, you know, it's not doesn't be perfect.

208
00:14:20,810 --> 00:14:23,210
But if we write this for somebody else, we go put this on GitHub.

209
00:14:23,510 --> 00:14:26,090
We kind of want all those errors to be handled.

210
00:14:26,360 --> 00:14:28,340
And that's where these exceptions come into play.

211
00:14:28,520 --> 00:14:30,980
And these if statements at the beginning come into play as well.

212
00:14:30,980 --> 00:14:35,720
So we can handle those errors and those exceptions and we can really start thinking logically on how

213
00:14:35,900 --> 00:14:41,970
an end user might fat or something or break a program or do something even maliciously, possibly.

214
00:14:42,320 --> 00:14:48,860
So there are ways around this and we'll talk about it as well when we get into a bash script that I

215
00:14:48,860 --> 00:14:50,540
wrote later on in the course.

216
00:14:50,540 --> 00:14:54,560
And we can kind of look at how that was written and how it strips out some arguments and prevent some

217
00:14:54,560 --> 00:14:55,280
human error.

218
00:14:56,060 --> 00:14:57,310
But we'll get to that later.

219
00:14:57,410 --> 00:14:59,420
So let's go ahead and actually save this.

220
00:14:59,420 --> 00:15:04,100
Now, we've got our scanners scanner script and we're going to go ahead and run it.

221
00:15:05,000 --> 00:15:10,280
So I'm going to run this and I'm going to run this against my router.

222
00:15:10,280 --> 00:15:18,080
So my suggestion to you is to do the same or do it to a machine that, you know is in your network and

223
00:15:18,080 --> 00:15:19,310
has a port open.

224
00:15:19,520 --> 00:15:23,180
Why am I choosing my router and this specific range now?

225
00:15:23,180 --> 00:15:28,580
My router should have port fifty three open because of DNS and it should have Port 80 open because I

226
00:15:28,580 --> 00:15:30,500
need to access the web interface on it.

227
00:15:30,770 --> 00:15:32,240
So I'm going to go ahead and run this.

228
00:15:34,570 --> 00:15:40,250
And I have a typo, so I have something called soccer here.

229
00:15:40,270 --> 00:15:41,310
I sure do.

230
00:15:41,620 --> 00:15:43,990
If you caught that originally good job.

231
00:15:44,320 --> 00:15:45,740
You knew I was going to mess up.

232
00:15:45,760 --> 00:15:46,800
Let's try it one more time.

233
00:15:49,000 --> 00:15:49,880
And there you go.

234
00:15:50,410 --> 00:15:52,970
So it just ran through it really fast, said Port.

235
00:15:52,990 --> 00:15:58,510
Fifty three is open, Port eight is open, and immediately it knew.

236
00:15:58,900 --> 00:15:59,470
It knew.

237
00:15:59,500 --> 00:16:01,120
So it did its job.

238
00:16:01,120 --> 00:16:06,040
It went out there and it found Port 53 Importante, which is what I was expecting.

239
00:16:06,280 --> 00:16:08,340
Hopefully yours did the same.

240
00:16:08,680 --> 00:16:14,560
Now I could back this off to one through, you know, sixty five thousand five thirty five.

241
00:16:14,750 --> 00:16:19,120
And another thing we can do, if you want to see the speed, let's say sixty five, five.

242
00:16:19,120 --> 00:16:19,870
Thirty five.

243
00:16:19,870 --> 00:16:28,640
I am going to keyboard interrupt this, but we can print out something along the lines of checking for

244
00:16:28,690 --> 00:16:30,940
and then we'll do something like this.

245
00:16:31,450 --> 00:16:34,650
OK, and then we say format and then port.

246
00:16:35,920 --> 00:16:39,840
So when we say this and we run it, let's take a look now.

247
00:16:43,940 --> 00:16:45,650
So it's checking through all these parts.

248
00:16:46,220 --> 00:16:51,020
It's going kind of fast, but look, it's it's finding parts, but this isn't pretty.

249
00:16:51,080 --> 00:16:51,400
Right.

250
00:16:51,410 --> 00:16:52,430
We wouldn't want this.

251
00:16:52,430 --> 00:16:56,280
We only want it to say when the ports open, but it's taking some time.

252
00:16:57,530 --> 00:16:58,530
We're on port.

253
00:16:58,730 --> 00:17:00,840
Twenty thousand of sixty five thousand.

254
00:17:00,860 --> 00:17:08,870
So on top of, you know, just being being a little bit annoying, it's it's really throwing our screen

255
00:17:08,870 --> 00:17:10,490
into twenty thousand lines now.

256
00:17:10,850 --> 00:17:16,580
So the only reason I would put a statement in here like this is if I was doing a couple numbers and

257
00:17:16,580 --> 00:17:21,200
I wanted to see like if we go back to 15 to 80, we'll do eighty one.

258
00:17:21,560 --> 00:17:22,370
We do this.

259
00:17:22,370 --> 00:17:24,920
It's a good way to see how fast your scanner is running.

260
00:17:24,920 --> 00:17:27,650
If it's running, it's a good way to have print statements in there.

261
00:17:27,650 --> 00:17:32,750
If you might see any errors and you could see it ran through 80 pretty fast and found fifty three and

262
00:17:32,750 --> 00:17:33,350
eighty open.

263
00:17:33,350 --> 00:17:35,360
So I would delete this.

264
00:17:35,360 --> 00:17:40,730
If you want to do a full port scan again, you could do one three sixty five five thirty five.

265
00:17:41,780 --> 00:17:42,980
Go ahead and say that.

266
00:17:43,670 --> 00:17:48,830
Sorry if you hurt my dog barking It's really windy tonight so we're going to go ahead and do it one

267
00:17:48,830 --> 00:17:51,650
more time and now it should be a little prettier.

268
00:17:52,550 --> 00:17:55,280
And then as the ports are open, it'll print out.

269
00:17:56,310 --> 00:17:59,910
And if you want to get fancier, you can have a little thing at the bottom that says, hey, this took

270
00:17:59,910 --> 00:18:04,890
this long to scan, here's how many ports are open, etc. So this is finding all airports.

271
00:18:05,200 --> 00:18:09,570
So I'm going to go ahead and control, see, and you can see now exiting program, our keyboard interrupt

272
00:18:09,570 --> 00:18:10,050
worked.

273
00:18:10,440 --> 00:18:14,330
So everything is working really, really well and that is it.

274
00:18:14,340 --> 00:18:16,410
So that's it for the Python series.

275
00:18:16,620 --> 00:18:18,430
And hopefully this all made sense.

276
00:18:18,430 --> 00:18:19,680
This all built upon it.

277
00:18:20,070 --> 00:18:21,480
You know, we could take this in.

278
00:18:21,480 --> 00:18:24,700
The goal here, again, is not to be an expert in Python.

279
00:18:24,720 --> 00:18:29,560
The goal here is to get you interested in Python, to get you seeing that it's really not that bad.

280
00:18:29,790 --> 00:18:36,770
And in about an hour and a half to two hours time, we started with nothing and built out a nice script

281
00:18:36,780 --> 00:18:39,750
at all, you know, just built less and less until we got here.

282
00:18:40,170 --> 00:18:43,200
So we're going to move on and actually get into the hacking.

283
00:18:43,200 --> 00:18:46,980
You have successfully completed all of your foundational courses.

284
00:18:46,980 --> 00:18:48,980
We've got the Linux down.

285
00:18:48,990 --> 00:18:52,890
We've got the networking down, we've got the Python down, and now we're ready to get into the good

286
00:18:52,890 --> 00:18:53,270
stuff.

287
00:18:53,640 --> 00:18:56,160
So I'm very excited to do the hacking.

288
00:18:56,160 --> 00:18:57,630
This is our strong suit.

289
00:18:57,630 --> 00:19:00,570
This is our bread and butter, and we're really going to knock it out of the park.

290
00:19:00,570 --> 00:19:05,130
So I will catch you over in the next video when we start learning about hacking.
